https://www.allaboutcircuits.com/worksheets/analog-to-digital-conversion/?